// 云服务配置接口
export interface CloudConfig {
  provider: 'tencent' | 'aliyun' | 'bytedance' | 'aws' | 'huawei';
  accessKeyId: string;
  secretAccessKey: string;
  region: string;
  bucket: string;
  endpoint?: string;
}

// 文件信息接口
export interface FileInfo {
  key: string;
  size: number;
  lastModified: Date;
  etag?: string;
  md5?: string;
}

// 文件比较结果接口
export interface ComparisonResult {
  newFiles: string[];
  modifiedFiles: string[];
  unchangedFiles: string[];
  totalSize: number;
}

// 上传进度接口
export interface UploadProgress {
  currentFile: string;
  fileProgress: number; // 当前文件进度 0-100
  filesCompleted: number;
  totalFiles: number;
  bytesUploaded: number;
  totalBytes: number;
  speed: number; // bytes per second
  overallProgress: number; // 总体进度 0-100
  status: 'idle' | 'uploading' | 'completed' | 'error' | 'cancelled';
  error?: string;
}

// 云服务接口
export interface CloudServiceInterface {
  uploadFile(localPath: string, remotePath: string, onProgress?: (progress: number) => void): Promise<boolean>;
  listFiles(prefix?: string): Promise<FileInfo[]>;
  deleteFile(key: string): Promise<boolean>;
  testConnection(): Promise<boolean>;
  getFileUrl(key: string): string;
  fileExists?(key: string): Promise<boolean>;
  deleteMultipleFiles?(keys: string[]): Promise<boolean>;
  getFileMetadata?(key: string): Promise<FileInfo | null>;
  getPresignedUrl?(key: string, expires?: number): Promise<string>;
}